UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uzNbN4zEmn0zc0qpZz5CKcI+DV/Xd0TuhuvMQfmGcrs=' 
WHERE 
  key_id = '7d06b4776e2b96c4bfc24f11ecf5f13c3d3adb1050ed9db5b8c2ac62ce36c24b' 
  AND (
    token = 'uzNbN4zEmn0zc0qpZz5CKcI+DV/Xd0TuhuvMQfmGcrs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037