UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BijOexfuhLC+r3alZDXACtaVR+hDeKKeEVwrbxKtErY='
WHERE
key_id = '0533e084b85b523f3be6d447cc8c105ad70fab39fecd01588799dedc32a96537'
AND (
token = 'BijOexfuhLC+r3alZDXACtaVR+hDeKKeEVwrbxKtErY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)