UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'np7JW1iGCU/OeLP2dpdBmKfpJf1IhyXnG4AN2pR796I='
WHERE
key_id = 'b69cad67a695616d2c55c5edf22d345a9880123549495701d72cb9add3bd7b44'
AND (
token = 'np7JW1iGCU/OeLP2dpdBmKfpJf1IhyXnG4AN2pR796I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)