UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rOVUz7YQ2Ih/RqLbmtyJB2d82vUgxaLlBl7Ncc8d4zo='
WHERE
key_id = '33d75ac76276cb90ebde9715e664526aec36fe215a20dc23b6fc5591287e971e'
AND (
token = 'rOVUz7YQ2Ih/RqLbmtyJB2d82vUgxaLlBl7Ncc8d4zo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)