UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm1PwM5D6uuMRr/Hqvrd6mPMoSPfngiH/aPzLyqwm2g8='
WHERE
key_id = '2841193da2bbfa6c0f5d5306a027c5a780ae14b784f38ee8058fbaff729ba88c'
AND (
token = 'm1PwM5D6uuMRr/Hqvrd6mPMoSPfngiH/aPzLyqwm2g8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)