UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Pb2I6picg6wUUSCHMR5R3DCfdUJkz4cx+uY4H2H8xnI=' 
WHERE 
  key_id = '7a7ba67572ce2cd3bbbbeb284c9dfe0c9991cbc0fd16a4f4535f2d89503671ad' 
  AND (
    token = 'Pb2I6picg6wUUSCHMR5R3DCfdUJkz4cx+uY4H2H8xnI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026