UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bLC9z22tYtiGluRxfk7HjXYu07fzEgvH+7gbxxO9yg0='
WHERE
key_id = '9465f317ebf8ba49f45c1202f1eda9f4aee3969c9c80343ce1cf59dac58c934f'
AND (
token = 'bLC9z22tYtiGluRxfk7HjXYu07fzEgvH+7gbxxO9yg0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)