UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ceKWhmyB9/IZra2O2BD4l5/YIj5ENiOMJsOmjNInVoQ='
WHERE
key_id = '9ce8a43a7570cd71ab0368d8618451d44cf5164b08b7e07b5cd3ee60498f95c4'
AND (
token = 'ceKWhmyB9/IZra2O2BD4l5/YIj5ENiOMJsOmjNInVoQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)