UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DxmmfzcSPOumNCYHG/omMul8zkUcaspyAILt5d6Wls0='
WHERE
key_id = '2a2eeca1e60c92dfd2291a41debab5531b20cab36e30b4318cf9fa25241b99af'
AND (
token = 'DxmmfzcSPOumNCYHG/omMul8zkUcaspyAILt5d6Wls0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)