UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zeHFScSfZetIdEUQgNHCeK8JVDLg6FWldlxsH9ZdTOA=' 
WHERE 
  key_id = '6decde07d28c3d8d6b8516628ea322c64eea74bca3f9a9bb5072ae35c0b6c565' 
  AND (
    token = 'zeHFScSfZetIdEUQgNHCeK8JVDLg6FWldlxsH9ZdTOA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048