UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wVavrxyIXKQ+eCHggF+3cT5n0tI/wLsJ8EJrpP8uJUE=' 
WHERE 
  key_id = '048948bc535f16475ea7ac8361ab7b0528c7ee62087ad00bfb5e0e822031bcaa' 
  AND (
    token = 'wVavrxyIXKQ+eCHggF+3cT5n0tI/wLsJ8EJrpP8uJUE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033