UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E/g+U5yrp/NInw7zNa1JQOnaV+TrYEt7BJm2nUcwI6I='
WHERE
key_id = 'bb11fba8bfd6ab74f2ca406c723af72c98a1fe881fe1559161ed8ab6f2ab90f6'
AND (
token = 'E/g+U5yrp/NInw7zNa1JQOnaV+TrYEt7BJm2nUcwI6I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)