UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YJ62QDYl8/yGkJYVzVTXY4c+WMAhtICOxtsp62FpkSE='
WHERE
key_id = '714825d1f009980d7e6ae0d7b994bc16d34c1d966a06bbefce305c95c29a4626'
AND (
token = 'YJ62QDYl8/yGkJYVzVTXY4c+WMAhtICOxtsp62FpkSE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)