UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't664Gmq9gGt0eUCLXL7Jm8j2KdRiOvU0/rv/mU1Hu7A='
WHERE
key_id = '3cf247e25081e5b1f81a0fcf41a3b40ac7660ce8aa57ee3978833a35a83c1886'
AND (
token = 't664Gmq9gGt0eUCLXL7Jm8j2KdRiOvU0/rv/mU1Hu7A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)