UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nQxai4sQtycBV5u1jJ+GwtxFNgOwpIBOz1GWlmEPBu4=' 
WHERE 
  key_id = '98376781c1c50098a53da3ac52c9e6de843d40b43984244476b0363e95f96d28' 
  AND (
    token = 'nQxai4sQtycBV5u1jJ+GwtxFNgOwpIBOz1GWlmEPBu4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047