UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gWmsYHaMq8VOd4/Uini2bvH2JLo/m6adGbS4xXNSaU4='
WHERE
key_id = '62613bb2720e3d9d290f9901bf7258d13c8e335c693cab3e5953503d02746005'
AND (
token = 'gWmsYHaMq8VOd4/Uini2bvH2JLo/m6adGbS4xXNSaU4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)