UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MyX7bLC0e5mfLvwAJS/8/Ibu08MdeOtXehQ4QOR2lek='
WHERE
key_id = '88debf08fb5477ce2fea89ec202949f0fae30cf6fcbfc2d6774fcc2526b34601'
AND (
token = 'MyX7bLC0e5mfLvwAJS/8/Ibu08MdeOtXehQ4QOR2lek='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)