UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Bl0wQ4Y7ltQbDjYrUChqhsIUeIcJmRmf3DHsayWCHvk=' 
WHERE 
  key_id = 'bb32b85a4411de2e76496e76ceddf4e090bdfb3475683b9349c75d7aab44ac56' 
  AND (
    token = 'Bl0wQ4Y7ltQbDjYrUChqhsIUeIcJmRmf3DHsayWCHvk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022