UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'K2JhfJ8txDM/xQ6zImh2fMiMXcJwY7u+Gof511PaZIc='
WHERE
key_id = '019a266b64869a9a38e81fc263d1c0d30cd6eadd1567b6398aa3d28b69edb68a'
AND (
token = 'K2JhfJ8txDM/xQ6zImh2fMiMXcJwY7u+Gof511PaZIc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)