UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jMAu24Gsso0VBvRqAq39Z4G5/kBofK/8/tJ5fXECanM='
WHERE
key_id = '3db84ee2ae3304c4f110b21803e245f59f5418b0ae5c8c656cd3d44a592c3f89'
AND (
token = 'jMAu24Gsso0VBvRqAq39Z4G5/kBofK/8/tJ5fXECanM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)