UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bgd4fAPA2fGLTtmZr46ZVQDW4y9kO6l/gtHVKy3SmU8=' 
WHERE 
  key_id = 'aa004e95db6a14f8ba2902e6b563cbf175bb8f9f3b72b1062cdf39488f01dbe9' 
  AND (
    token = 'bgd4fAPA2fGLTtmZr46ZVQDW4y9kO6l/gtHVKy3SmU8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048