UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7DRPuypkx+r/ftVyx07L6Svht9xPhGUClZL2lsGyug0=' 
WHERE 
  key_id = '61c38ddb587ef115fae6fdb2d4424f7644bdff19b0226f3d902c5d79b5ae3f2c' 
  AND (
    token = '7DRPuypkx+r/ftVyx07L6Svht9xPhGUClZL2lsGyug0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046