UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3kjFb6JtLuwHed/1JhQTBnBq74IWB+QnoeaxyOJmR4s='
WHERE
key_id = 'b4c018d2131939a1a19a201add0c1c306d3b2bb5db63e513b26fb8e715ebb846'
AND (
token = '3kjFb6JtLuwHed/1JhQTBnBq74IWB+QnoeaxyOJmR4s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)