UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'L0CG4A5fNLZyHFZa5t0EGA8iiQczYip8Oqz0u/yOmEc=' 
WHERE 
  key_id = '570f8a19e1c377a266f9ff87fc6dfa532d7f66e0b14653dbdc4668e06736932d' 
  AND (
    token = 'L0CG4A5fNLZyHFZa5t0EGA8iiQczYip8Oqz0u/yOmEc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029