UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MVMBpmkrdAezzOKsXZLhP9a0uQzwkZRil4509+AzhxI='
WHERE
key_id = '94dd7dc19e247e1b06ee36ce7fff0f0b100722bc387bf1648828af7686cb2ecb'
AND (
token = 'MVMBpmkrdAezzOKsXZLhP9a0uQzwkZRil4509+AzhxI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)