UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PBW8vsFviZHn2uFvqgElyJRKbKFo4w+JJDatGametjs='
WHERE
key_id = '833e1073d40548e1856d42d2ba88e000bbec978b2dd8ead78ca1b56d4b870eec'
AND (
token = 'PBW8vsFviZHn2uFvqgElyJRKbKFo4w+JJDatGametjs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)