UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mhfoq3g+DfKTlrK9vrG2dG56KEKOpS61z0UD9kJ5RSQ='
WHERE
key_id = 'cf9226f6eb9b9842e3b5189dbb9fe2974a15a376ca87b35f8cd3344f26ff813f'
AND (
token = 'Mhfoq3g+DfKTlrK9vrG2dG56KEKOpS61z0UD9kJ5RSQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)