UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V9Akb/roQGVUhDEf9m3w4bP6knZhjdWXB5opaCXZ/lo='
WHERE
key_id = '45a608a5b90c311937fb561a5d4f5c0d5852861191db5a5bca4682fbaebbc6a8'
AND (
token = 'V9Akb/roQGVUhDEf9m3w4bP6knZhjdWXB5opaCXZ/lo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)