UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DG/01VVgerrcU/C4rwJwtzGf32tVVtulM/2PCc9nbpk='
WHERE
key_id = 'f192d1e9f445f84ff27d77401d0fa5264297cc351bcb10422c5b8bc108d0e86f'
AND (
token = 'DG/01VVgerrcU/C4rwJwtzGf32tVVtulM/2PCc9nbpk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)