UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GXXEtgNJ5WpWV0Hrlfe32RWk68Y0MOrMXX9sbBqa3Y0=' 
WHERE 
  key_id = '3ed911a6d3d3ccc112022d22f41cdf8b331e470f7cdb24b7116f4b4520c24ba8' 
  AND (
    token = 'GXXEtgNJ5WpWV0Hrlfe32RWk68Y0MOrMXX9sbBqa3Y0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036