UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VhStotssB98DPXfNEX4yGrJ0+ZZuP7u12O/yl5CnWRY='
WHERE
key_id = '1942de34d84ff8a5bfbf2b2462716c8841c35400f3081236a757d5dd2ebb5965'
AND (
token = 'VhStotssB98DPXfNEX4yGrJ0+ZZuP7u12O/yl5CnWRY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)