UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nvi7Dzts0XfZP8/9Jzi+lcPbeW+QSxVQ3KtyyDlGTrI='
WHERE
key_id = '25b71ed95968f0b5ff59c72433a6f238a6339af9c0b6f806abe8cf3f49d81db6'
AND (
token = 'nvi7Dzts0XfZP8/9Jzi+lcPbeW+QSxVQ3KtyyDlGTrI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)