UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eH4Azj2nG4IiIijlZJ9GVTKLiXd+sADLDvu0pH2DIVE='
WHERE
key_id = '7636620e91a14b3419e8be1f319ebd3e62c0a30fdd770731cb25b065712bfc89'
AND (
token = 'eH4Azj2nG4IiIijlZJ9GVTKLiXd+sADLDvu0pH2DIVE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)