UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EFddA4Y0OOJD16198B1jPeBTYaI6nRP4EStwO5i/LFQ=' 
WHERE 
  key_id = '85e7a41935760bd87e4a6366d7a967f989f612fbdba0098d5818abbd0a5c08a6' 
  AND (
    token = 'EFddA4Y0OOJD16198B1jPeBTYaI6nRP4EStwO5i/LFQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017