UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pz6jwB27n1cMVEYzqxMTLc7wm9CzMPKOFm/qZ/ZCcb8='
WHERE
key_id = '68e2cefb87ab3d168587cc5e9497b1d0f0cf1ef100bbee3e91753f90458b6efe'
AND (
token = 'pz6jwB27n1cMVEYzqxMTLc7wm9CzMPKOFm/qZ/ZCcb8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)