UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FSQA/JkIq6hu2b2K4xrtp7qLsBvYWSapCyVhMjSP2Fc=' 
WHERE 
  key_id = '13a7e696bb03ec68fcc39932f3ba7785b89562c77a8a1d327a4d2f791b72c2ed' 
  AND (
    token = 'FSQA/JkIq6hu2b2K4xrtp7qLsBvYWSapCyVhMjSP2Fc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033