UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Eki5xgLSpLevOlzZy4VdgiMXF3L9cGxAY2GkYTpBaB0=' 
WHERE 
  key_id = '64e518016b093a75178e36c2c15d0304b105fc0df5a34aa2cea8c74a148f0cf4' 
  AND (
    token = 'Eki5xgLSpLevOlzZy4VdgiMXF3L9cGxAY2GkYTpBaB0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027