UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9EOdLFJhERUJD/1RJYsaiGmASWrJQqv8uby9kWlqV/0='
WHERE
key_id = 'f71b8dfaa816fd2cdfb1e9d110b29d5a2830ada0c7cf52c3fd2d2965fee31c14'
AND (
token = '9EOdLFJhERUJD/1RJYsaiGmASWrJQqv8uby9kWlqV/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)