UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2yDo5GZ0RTKYxNcBt+MwvkX8gLn8I3Z/hzQLGxHwEA4=' 
WHERE 
  key_id = '79b5ea64d0bae0830a496463fdcfdbecadcd205515a90b49d4df9573b73df463' 
  AND (
    token = '2yDo5GZ0RTKYxNcBt+MwvkX8gLn8I3Z/hzQLGxHwEA4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039