UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'x4BUfON40JhPrVOpA7eKfOEwDudZwNXhV2hPGnsG1x8=' 
WHERE 
  key_id = '94c97be745d7d69be6bcc8c640ba826059f4d6c60798d8c3a2b195b7c9a9de99' 
  AND (
    token = 'x4BUfON40JhPrVOpA7eKfOEwDudZwNXhV2hPGnsG1x8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043