UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vXoGy6yZVhJHaqXuwrsD0rj+xhndgx+D/qPOZUoQumE='
WHERE
key_id = '45106c9a15d8b3f2d1a41be6cb5aa8cf89f03eb3a37a3bb660cf41a2adff380b'
AND (
token = 'vXoGy6yZVhJHaqXuwrsD0rj+xhndgx+D/qPOZUoQumE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)