UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fK4l0/ZKQ9nSVRjVHRQRI77q20LHvmSOek7hDRbuhjo='
WHERE
key_id = 'eeadb24a0ac39d4697b9a00f1d5e9ddd4496c53ef59d69793cd3ab69a3156b1d'
AND (
token = 'fK4l0/ZKQ9nSVRjVHRQRI77q20LHvmSOek7hDRbuhjo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)