UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JXVhhhGcMxbCfw0TjgwtE8vWm8D+LpljpXioZKTAZds='
WHERE
key_id = 'b0d925fd6cb47a067b271b4ecb9e029956e21943f88e677038afa3448424dd88'
AND (
token = 'JXVhhhGcMxbCfw0TjgwtE8vWm8D+LpljpXioZKTAZds='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)