UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PPLb05w3mj8lqd2jYnHHRWuGIBspG8LO7FNR6AYMM2E='
WHERE
key_id = '45301bdf426a17c31f797d912069aeb385be7b2e18c388cd9d144be5adb99854'
AND (
token = 'PPLb05w3mj8lqd2jYnHHRWuGIBspG8LO7FNR6AYMM2E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)