UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ok1VSkRxVBRwAdf8INeFJK918wqki4MfMvELCgYICgo=' 
WHERE 
  key_id = '922092a9aa9eaf455edc0cf2136d559d43d3cd4a9a736cbb75840743e3de9d34' 
  AND (
    token = 'ok1VSkRxVBRwAdf8INeFJK918wqki4MfMvELCgYICgo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00058