UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aHEu93FybSfLigLe4Ae/3augba7JCprb8yxPO4Uduyo='
WHERE
key_id = '35a1ed1d0a78b96d0a14c0d42619c885b07bca044324804e73e55fc6c2b64a05'
AND (
token = 'aHEu93FybSfLigLe4Ae/3augba7JCprb8yxPO4Uduyo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)