UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RQuho2dToIV8s30gPPF0enZ4JFbSW8euFSuo/bwUmzE='
WHERE
key_id = '7f0c1c4cb18de52381e7b477032ca4af359cfd4dddc867cd52460670ac0d915b'
AND (
token = 'RQuho2dToIV8s30gPPF0enZ4JFbSW8euFSuo/bwUmzE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)