UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u5tlGhve22JHeWa49GOV4ni/t0MWbDXeaMK5V9BJ6Vc='
WHERE
key_id = '8b9e9f3943d53ebdbd1b3d5e4060343c16c031d667fda327804a3b5cf4611f92'
AND (
token = 'u5tlGhve22JHeWa49GOV4ni/t0MWbDXeaMK5V9BJ6Vc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)